package sqlib.test;

import sqlib.SQLGenerator;
import sqlib.connector.MySQLGenerator;
import sqlib.connector.OracleSQLGenerator;
import sqlib.domain.Employee;
import sqlib.domain.Project;

public class Main {

	public static void main(String[] args) {
		SQLGenerator gen = new SQLGenerator(new OracleSQLGenerator());

		System.out.println(gen.createTableInstruction(Employee.class));

		gen.setMapper(new MySQLGenerator());

		System.out.println(gen.createTableInstruction(Employee.class));

		Employee e1 = new Employee(1, "Mourinho");
		Employee e2 = new Employee(7, "Cristiano");
		Project p = new Project("testproj", 2);

		// System.out.println(gen.createInsertStatement(e1));
		// System.out.println(gen.createInsertStatement(e2));
		// System.out.println(gen.createInsertStatement(p));
		//
		// Class<?> c = Employee.class;
		//
		// System.out.println(c.getName());
		// for(Field f : c.getDeclaredFields()) {
		// f.setAccessible(true);
		// try {
		// System.out.println("\t" + f.getName() + " : " + f.get(e1));
		// } catch (IllegalArgumentException e) {
		// e.printStackTrace();
		// } catch (IllegalAccessException e) {
		// e.printStackTrace();
		// }
		// }

	}

}
